<template>
  <div class="header">
    <div class="goback" @click="back"><i class="iconfont icon-left"></i></div>
    <div class="title">{{title}}</div>
  </div>
</template>

<script type="text/ecmascript-6">
  export default{
    props: {
      title: {
        type: String
      }
    },
    data () {
      return {
      };
    },
    created(){

    },
    mounted(){

    },
    methods: {
      back: function () {
        this.$router.back(-1);
      }
    }
  };
</script>

<style type="text/scss" lang="scss">
  .header{
    width: 100%;
    height: 44px;
    position: fixed;
    top:0;
    background-color: #FFFFFF;
    z-index: 101;
    .title{
      width: 100%;
      text-align: center;
      line-height: 44px;
      font-size: 17px;
      color: #5d5d5d;
    }
    .goback{
      position: absolute;
      width: 50px;
      line-height: 44px;
      left:0;
      top:0;
      padding-left: 10px;
      box-sizing: border-box;
      i{
        font-size: 20px;
        color: #5d5d5d;
      }
    }
  }
</style>
